import { axios } from "@/request";

const requestApi = {
  // GET
  getMarket: (param) => axios("GET", "api/stock/getMarket", param), //获得大盘数据
  
  
  // POST
  zdStock: (param) => axios("POST", "api/stock/zdStock", param),
  getCode: (param) => axios("POST", "code/getCode", param), //获取验证码
  getNewsList: (param) => axios("POST", "api/art/list", param), //获得首页公告的抬头
  getIndustrys: (param) => axios("POST", "api/stock/getIndustrys", param), //获取股票类型列表
  getStock: (param) => axios("POST", "api/stock/getStock", param), //获取股票类型信息
  getRedStockList: (param) => axios("POST", "redStock/getRedStockList", param), //红利股票列表
  getTigerStockList: (param) => axios("POST", "api/stock/getTigerStockList", param), //红利股票列表
  getNewsByRegion: (param) => axios("POST", "api/art/getNewsByRegion", param), // 新闻列表
  login: (param) => axios("POST", "api/user/login", param), //登录
  reg: (param) => axios("POST", "api/user/reg", param), //登录
  logout: (param) => axios("POST", "api/user/logout", param), //登录
  
  // 公共接口
  getSingleStock: (param) => axios("POST", "api/stock/getSingleStock", param), // 获取单个股票信息
  
  // user模块
  getUserCapitalDetail: (param) => axios("POST", "user/getUserCapitalDetail", param), //用户资金明细
  getUserMoney: (param) => axios("POST", "user/getUserMoney", param), //查询用户资金信息
  getUserInfo: (param) => axios("POST", "user/getUserInfo", param), //查询用户资金信息
  updatePwd: (param) => axios("POST", "user/updatePwd", param), //查询用户资金信息
  
  recharge: (param) => axios("POST", "user/recharge/list", param), //用户资金明细
  withdraw: (param) => axios("POST", "user/withdraw/list", param), //用户资金明细
  outMoney: (param) => axios("POST", "user/withdraw/outMoney", param), //用户提现
  insertWithPwd: (param) => axios("POST", "user/insertWithPwd", param), //新增支付密码
  updateWithPwd: (param) => axios("POST", "user/updateWithPwd", param), //修改支付密码
  // 银行卡
  bankAdd: (param) => axios("POST", "user/bank/add", param), //添加银行卡
  getBankInfo: (param) => axios("POST", "user/bank/getBankInfo", param), //添加银行卡

  auth: (param) => axios("POST", "user/auth", param), //实名认证
  getUserPositionInfo: (param) => axios("POST", "user/position/getUserPositionInfo", param),// 用户持仓信息
  getUserRedStockPosition: (param) => axios("POST", "user/position/getUserRedStockPosition", param),// 用户持仓信息
  sell: (param) => axios("POST", "user/sell", param),// 用户平仓
  // 跟单
  getDocumentList: (param) => axios("POST", "user/getDocumentList", param),// 获取发布的跟单列表
  getUserDocument: (param) => axios("POST", "user/getUserDocument",param),// 获取当前用户跟单列表
  addUserDocument: (param) => axios("POST", "user/getUserDocument",param), // 用户跟单
  // 申购
  getUserApplyListByUid:(param) => axios("POST","user/getUserApplyListByUid",param), // 查询用户申购列表
  getApplyInfo:(param) => axios("POST","user/getApplyInfo",param), // 新股申购列表
  addApply:(param) => axios("POST","user/addApply",param), // 新增用户申购信息
  // 自选
  getOptionByUserId:(param) => axios("POST","user/getOptionByUserId",param), // 获取用户自选列表
  addOption:(param) => axios("POST","user/addOption",param), // 添加自选股
  
  // 股票买卖
  buyCheckPrice: (param) => axios("POST","user/buyCheckPrice",param), // 购买限价股票下单
  buy: (param) => axios("POST","user/buy",param), // 购买股票下单
  buyRedStock: (param) => axios("POST","user/buyRedStock",param), // 购买红利股票
  sellRedStock: (param) => axios("POST","user/sellRedStock",param), // 红利股票平仓
};

export { requestApi };
